import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',


    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',


    component: () => import('../views/home/index.vue')
  },
  {
    path: '/home/city',
    name: 'city',
    component: () => import('../views/home/city/index.vue')
  },
  {
    path: '/home/search',
    name: 'search',
    component: () => import('../views/home/search/index.vue')
  },
  {
    path: '/home/newgoods',
    name: 'newgoods',
    component: () => import('../views/home/newgoods/index.vue')
  }
  ,
  {
    path: '/topic',
    name: 'topic',
    component: () => import('../views/topic/index.vue')
  }
  ,
  {
    path: '/category',
    name: 'category',
    component: () => import('../views/category/index.vue')
  }
  ,
  {
    path: '/category/list',
    name: 'list',
    component: () => import('../views/category/list/index.vue')
  }
  ,
  {
    path: '/category/list/info',
    name: 'info',
    component: () => import('../views/category/list/info/index.vue')
  }
  ,
  {
    path: '/cart',
    name: 'cart',
    component: () => import('../views/cart/index.vue')
  }
  ,
  {
    path: '/cart/order',
    name: 'order',
    component: () => import('../views/cart/order/index.vue')
  }
  ,
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/my/index.vue')
  },
  {
    path: '/my/address',
    name: 'address',
    component: () => import('../views/my/address/index.vue')
  }



]

const router = new VueRouter({
  routes
})

export default router
